home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11761 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: galaxy.ucr.edu!not-for-mail
  2. From: thp@cs.ucr.edu (Tom Payne)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Will JAVA kill C++?
  5. Date: 16 Mar 1996 01:46:06 GMT
  6. Organization: University of California, Riverside
  7. Message-ID: <4id6gu$skr@galaxy.ucr.edu>
  8. References: <313E44EA.14D110C0@netcom.com> <4hp18v$3di@frodo.smartlink.net> <4hq2j6$q93@galaxy.ucr.edu> <4i57fv$rgn@News.Dal.Ca>
  9. NNTP-Posting-Host: corvette.ucr.edu
  10. X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
  11.  
  12. Dan Kelley (kelley@phys.ocean.dal.ca) wrote:
  13. : Tom Payne (thp@cs.ucr.edu) wrote:
  14. : : When one is interested in speed, one should avoid pointers (as
  15. : : does. Fortran), since pointers kill opportunities for optimization.
  16. : As a scientist who once walked a FORTRAN highway daily, who took an
  17. : off-ramp to c++/perl/matlab/gri, I have to take the bait thus
  18. : offered.
  19. : Am I to suffer yet another language shift?  
  20.  
  21. I should hope not!!  
  22.  
  23. All I'm saying is that, if you want your compiler to optimize your
  24. code, you'll generally make its job easier (and it more successful),
  25. if you minimize your use of pointers.
  26.  
  27. There are also some programming-methodology reasons for avoiding
  28. pointers, which have been denounced as "the goto's of data".  But one
  29. can avoid pointers without avoiding languages that allow them,
  30. especially if the language has good support for references and
  31. associative arrays.  (Though, as Matt Austern pointed out, references
  32. leave open many of the aliasing issues that cause pointers to kill
  33. opportunities for optimization.)
  34.  
  35. Tom Payne
  36.